<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<button></button>

	<script>
		<!-- 默认是字符串类型 -->
		var a =prompt("请输入你的年龄");

		var btn = document.querySelector("button");

		a = Number(a);

		

		btn.onclick = function(){
			console.log(a+1);
		}

	</script>
</body>
</html>